<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>添加用户</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</head>
<script>
    $(function () {
        $("#btn_sub").click(function () {
            $.get("delete",$("#deleteForm").serialize(),function (data) {
                if(data.flag){
                    alert("删除成功！");
                    location.href="admin.html";
                }else{
                    $("#errorMsg").html(data.errorMsg)
                }
            })
        });
    });

</script>
<body>
<div class="container" style="width: 400px;">
    <h3 style="text-align: center;">删除用户</h3>
    <form id="deleteForm" action="" method="post" accept-charset="utf-8">
        <div class="form-group">
            <label for="empId">工号：</label>
            <input type="text" name="empId" class="form-control" id="empId" placeholder="请输入用户名"/>
        </div>
        <div class="form-group">
            <label for="name">用户名：</label>
            <input type="text" name="name" class="form-control" id="name" placeholder="请输入用户名"/>
        </div>
        <hr/>
        <div class="submit_btn" style="text-align: center;">
            <button type="button" class="btn btn-primary" id="btn_sub">提交</button>
        </div>
    </form>

    <!-- 出错显示的信息框 -->
    <div class="alert alert-warning alert-dismissible" role="alert">
        <button type="button" class="close" data-dismiss="alert" >
            <span>&times;</span>
        </button>
        <strong id="errorMsg"></strong>
    </div>
</div>
</body>
</html>